import service from './service.js'

const controller = (path, res, req) => {
  if (path.includes('/excute')) {
    service.excute(res, path)
  } else if (path.includes('/getDirData')) {
    service.getDirData(res, path)
  } else if (path.includes('/recordPlay')) {
    service.recordPlay(res, path)
  } else if (path.includes('/getPlayRecord')){
    service.getPlayRecord(res, path)
  } else if (path.includes('/getPlayLast')) {
    service.getPlayLast(res, path)
  } else if (path.includes('/createDir')) {
    service.createDir(res, path)
  } else {
    service.getAsset(res, path, req)
  }
}

export default controller